package com.liyao.storehouse.controller;

import com.liyao.storehouse.service.loginService;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * @program: smartTool
 * @description:
 * @author: liu yan
 * @create: 2022-07-27 14:31
 */
@Controller
public class loginController {
    @Resource
    loginService service;
    @RequestMapping("/login")
    @ResponseBody
    public JSONObject login(HttpSession session, String username, String password, HttpServletRequest request) throws Exception {
        return service.Mlogin(session,username,password,request);
    }

}
